package com.li.springbootproject.spring.beaninit;

import com.lidong.toolkit.constant.LogConst;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.UUID;

/**
 * @author LiDong
 * @version 1.0.0
 * @createTime 3/12/2022 4:13 PM
 */
public class InitMethodBean {

    private static final Logger logger = LoggerFactory.getLogger(InitMethodBean.class);

    private UUID id;

    private String name;

    private void initBean() {
        this.id = UUID.randomUUID();
        this.name = "InitMethodBean";
        logger.info(LogConst.LOG_SUCCESS_PREFIX + "执行 InitMethodBean 的 initBean()：" + this);
    }

    public UUID getId() {
        return id;
    }

    public void setId(UUID id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "InitMethodBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }
}
